package com.wang.myblog.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 博客-评论表
 * </p>
 *
 * @author s
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("yun_comment")
@ApiModel(value="Comment对象", description="博客-评论表")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "被评论的文章或者页面的ID")
    private Long sid;

    @ApiModelProperty(value = "父级评论的id")
    private Long pid;

    @ApiModelProperty(value = "评论人的昵称（未登录用户）")
    private String nickname;

    @ApiModelProperty(value = "评论人的头像地址")
    private String avatar;

    @ApiModelProperty(value = "评论人的邮箱地址（未登录用户）")
    private String email;

    @ApiModelProperty(value = "评论的内容")
    private String content;

    @ApiModelProperty(value = "支持（赞）")
    @TableField(fill = FieldFill.INSERT)
    private Integer support;

    @ApiModelProperty(value = "反对（踩）")
    @TableField(fill = FieldFill.INSERT)
    private Integer oppose;

    @ApiModelProperty(value = "评论日期")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "被@的评论的昵称")
    private String replyUser;

    @ApiModelProperty(value = "是否删除")
    private Boolean isDelete;


}
